home *** CD-ROM | disk | FTP | other *** search
Unknown | 1998-11-02 | 9.5 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 49 97 01 2f 2f 3d 3d 3d |........|I..//===|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0a 2f 2f 20 55 |========|==..// U|
|00000060| 64 70 53 65 72 76 65 72 | 51 75 65 72 79 0d 0a 2f |dpServer|Query../|
|00000070| 2f 0d 0a 2f 2f 20 41 75 | 74 68 6f 72 3a 20 42 72 |/..// Au|thor: Br|
|00000080| 61 6e 64 6f 6e 20 22 47 | 72 65 65 6e 4d 61 72 69 |andon "G|reenMari|
|00000090| 6e 65 22 20 52 65 69 6e | 68 61 72 74 0d 0a 2f 2f |ne" Rein|hart..//|
|000000a0| 20 56 65 72 73 69 6f 6e | 3a 20 31 2e 30 0d 0a 2f | Version|: 1.0../|
|000000b0| 2f 0d 0a 2f 2f 20 54 68 | 69 73 20 71 75 65 72 79 |/..// Th|is query|
|000000c0| 20 73 65 72 76 65 72 20 | 69 73 20 63 6f 6d 70 6c | server |is compl|
|000000d0| 69 61 6e 74 20 77 69 74 | 68 20 74 68 65 20 47 61 |iant wit|h the Ga|
|000000e0| 6d 65 53 70 79 20 55 70 | 6c 69 6e 6b 20 53 70 65 |meSpy Up|link Spe|
|000000f0| 63 69 66 69 63 61 74 69 | 6f 6e 2e 0d 0a 2f 2f 20 |cificati|on...// |
|00000100| 54 68 65 20 73 70 65 63 | 69 66 69 63 61 74 69 6f |The spec|ificatio|
|00000110| 6e 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 20 61 |n is ava|ilable a|
|00000120| 74 20 68 74 74 70 3a 2f | 2f 77 77 77 2e 67 61 6d |t http:/|/www.gam|
|00000130| 65 73 70 79 2e 63 6f 6d | 2f 64 65 76 65 6c 6f 70 |espy.com|/develop|
|00000140| 65 72 0d 0a 2f 2f 20 61 | 6e 64 20 6d 69 67 68 74 |er..// a|nd might|
|00000150| 20 62 65 20 6f 66 20 75 | 73 65 20 74 6f 20 70 72 | be of u|se to pr|
|00000160| 6f 67 61 6d 6d 65 72 73 | 20 77 68 6f 20 61 72 65 |ogammers| who are|
|00000170| 20 77 72 69 74 69 6e 67 | 20 6f 72 20 6d 61 69 6e | writing| or main|
|00000180| 74 61 69 6e 69 6e 67 0d | 0a 2f 2f 20 74 68 65 69 |taining.|.// thei|
|00000190| 72 20 6f 77 6e 20 73 74 | 61 74 20 67 61 74 68 65 |r own st|at gathe|
|000001a0| 72 69 6e 67 2f 67 61 6d | 65 20 71 75 65 72 79 69 |ring/gam|e queryi|
|000001b0| 6e 67 20 73 6f 66 74 77 | 61 72 65 2e 0d 0a 2f 2f |ng softw|are...//|
|000001c0| 0d 0a 2f 2f 20 4e 6f 74 | 65 3a 20 43 75 72 72 65 |..// Not|e: Curre|
|000001d0| 6e 74 6c 79 2c 20 53 65 | 6e 64 54 65 78 74 20 72 |ntly, Se|ndText r|
|000001e0| 65 74 75 72 6e 73 20 66 | 61 6c 73 65 20 69 66 20 |eturns f|alse if |
|000001f0| 73 75 63 63 65 73 73 66 | 75 6c 2e 0d 0a 2f 2f 0d |successf|ul...//.|
|00000200| 0a 2f 2f 20 46 75 6c 6c | 20 64 6f 63 75 6d 65 6e |.// Full| documen|
|00000210| 74 61 74 69 6f 6e 20 6f | 6e 20 74 68 69 73 20 63 |tation o|n this c|
|00000220| 6c 61 73 73 20 69 73 20 | 61 76 61 69 6c 61 62 6c |lass is |availabl|
|00000230| 65 20 61 74 20 68 74 74 | 70 3a 2f 2f 75 6e 72 65 |e at htt|p://unre|
|00000240| 61 6c 2e 65 70 69 63 67 | 61 6d 65 73 2e 63 6f 6d |al.epicg|ames.com|
|00000250| 2f 0d 0a 2f 2f 0d 0a 2f | 2f 3d 3d 3d 3d 3d 3d 3d |/..//../|/=======|
|00000260| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000270| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000280| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000290| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000002a0| 3d 3d 3d 3d 3d 3d 0d 0a | 63 6c 61 73 73 20 55 64 |======..|class Ud|
|000002b0| 70 53 65 72 76 65 72 51 | 75 65 72 79 20 65 78 70 |pServerQ|uery exp|
|000002c0| 61 6e 64 73 20 55 64 70 | 4c 69 6e 6b 20 63 6f 6e |ands Udp|Link con|
|000002d0| 66 69 67 3b 0d 0a 0d 0a | 2f 2f 20 47 61 6d 65 20 |fig;....|// Game |
|000002e0| 53 65 72 76 65 72 20 43 | 6f 6e 66 69 67 2e 0d 0a |Server C|onfig...|
|000002f0| 76 61 72 28 29 20 63 6f | 6e 66 69 67 20 73 74 72 |var() co|nfig str|
|00000300| 69 6e 67 5b 31 32 38 5d | 09 53 65 72 76 65 72 4e |ing[128]|.ServerN|
|00000310| 61 6d 65 3b 09 09 09 2f | 2f 20 4e 61 6d 65 20 6f |ame;.../|/ Name o|
|00000320| 66 20 74 68 65 20 73 65 | 72 76 65 72 2c 20 69 2e |f the se|rver, i.|
|00000330| 65 2e 3a 20 42 6f 62 27 | 73 20 53 65 72 76 65 72 |e.: Bob'|s Server|
|00000340| 2e 0d 0a 76 61 72 28 29 | 20 63 6f 6e 66 69 67 20 |...var()| config |
|00000350| 73 74 72 69 6e 67 5b 31 | 32 38 5d 20 09 41 64 6d |string[1|28] .Adm|
|00000360| 69 6e 4e 61 6d 65 3b 09 | 09 09 2f 2f 20 4e 61 6d |inName;.|..// Nam|
|00000370| 65 20 6f 66 20 74 68 65 | 20 73 65 72 76 65 72 20 |e of the| server |
|00000380| 61 64 6d 69 6e 2e 0d 0a | 76 61 72 28 29 20 63 6f |admin...|var() co|
|00000390| 6e 66 69 67 20 73 74 72 | 69 6e 67 5b 31 32 38 5d |nfig str|ing[128]|
|000003a0| 20 09 41 64 6d 69 6e 45 | 6d 61 69 6c 3b 09 09 09 | .AdminE|mail;...|
|000003b0| 2f 2f 20 45 6d 61 69 6c | 20 61 64 64 72 65 73 73 |// Email| address|
|000003c0| 20 6f 66 20 74 68 65 20 | 73 65 72 76 65 72 20 61 | of the |server a|
|000003d0| 64 6d 69 6e 2e 0d 0a 76 | 61 72 28 29 20 63 6f 6e |dmin...v|ar() con|
|000003e0| 66 69 67 20 69 6e 74 20 | 09 09 09 52 65 67 69 6f |fig int |...Regio|
|000003f0| 6e 3b 09 09 09 09 2f 2f | 20 52 65 67 69 6f 6e 20 |n;....//| Region |
|00000400| 6f 66 20 74 68 65 20 67 | 61 6d 65 20 73 65 72 76 |of the g|ame serv|
|00000410| 65 72 2e 0d 0a 76 61 72 | 28 29 20 6e 61 6d 65 09 |er...var|() name.|
|00000420| 09 09 09 09 51 75 65 72 | 79 4e 61 6d 65 3b 09 09 |....Quer|yName;..|
|00000430| 09 2f 2f 20 4e 61 6d 65 | 20 74 6f 20 73 65 74 20 |.// Name| to set |
|00000440| 74 68 69 73 20 6f 62 6a | 65 63 74 27 73 20 54 61 |this obj|ect's Ta|
|00000450| 67 20 74 6f 2e 0d 0a 76 | 61 72 20 69 6e 74 09 09 |g to...v|ar int..|
|00000460| 09 09 09 20 20 20 20 43 | 75 72 72 65 6e 74 51 75 |... C|urrentQu|
|00000470| 65 72 79 4e 75 6d 3b 09 | 2f 2f 20 51 75 65 72 79 |eryNum;.|// Query|
|00000480| 20 49 44 20 4e 75 6d 62 | 65 72 2e 0d 0a 0d 0a 2f | ID Numb|er...../|
|00000490| 2f 20 49 6e 69 74 69 61 | 6c 69 7a 65 2e 0d 0a 66 |/ Initia|lize...f|
|000004a0| 75 6e 63 74 69 6f 6e 20 | 50 72 65 42 65 67 69 6e |unction |PreBegin|
|000004b0| 50 6c 61 79 28 29 0d 0a | 7b 0d 0a 09 2f 2f 20 53 |Play()..|{...// S|
|000004c0| 65 74 20 74 68 65 20 54 | 61 67 0d 0a 09 54 61 67 |et the T|ag...Tag|
|000004d0| 20 3d 20 51 75 65 72 79 | 4e 61 6d 65 3b 0d 0a 0d | = Query|Name;...|
|000004e0| 0a 09 2f 2f 20 42 69 6e | 64 20 74 68 65 20 6c 69 |..// Bin|d the li|
|000004f0| 73 74 65 6e 20 73 6f 63 | 6b 65 74 0d 0a 09 69 66 |sten soc|ket...if|
|00000500| 28 20 21 42 69 6e 64 50 | 6f 72 74 28 47 65 74 53 |( !BindP|ort(GetS|
|00000510| 65 72 76 65 72 50 6f 72 | 74 28 29 2c 74 72 75 65 |erverPor|t(),true|
|00000520| 29 20 29 0d 0a 09 7b 0d | 0a 09 09 4c 6f 67 28 22 |) )...{.|...Log("|
|00000530| 55 64 70 53 65 72 76 65 | 72 51 75 65 72 79 3a 20 |UdpServe|rQuery: |
|00000540| 50 6f 72 74 20 66 61 69 | 6c 65 64 20 74 6f 20 62 |Port fai|led to b|
|00000550| 69 6e 64 2e 22 29 3b 0d | 0a 09 09 72 65 74 75 72 |ind.");.|...retur|
|00000560| 6e 3b 0d 0a 09 7d 0d 0a | 09 4c 6f 67 28 22 55 64 |n;...}..|.Log("Ud|
|00000570| 70 53 65 72 76 65 72 51 | 75 65 72 79 3a 20 50 6f |pServerQ|uery: Po|
|00000580| 72 74 20 22 24 50 6f 72 | 74 24 22 20 73 75 63 63 |rt "$Por|t$" succ|
|00000590| 65 73 66 75 6c 6c 79 20 | 62 6f 75 6e 64 2e 22 29 |esfully |bound.")|
|000005a0| 3b 0d 0a 7d 0d 0a 0d 0a | 2f 2f 20 52 65 74 75 72 |;..}....|// Retur|
|000005b0| 6e 20 74 68 65 20 73 65 | 72 76 65 72 27 73 20 70 |n the se|rver's p|
|000005c0| 6f 72 74 20 6e 75 6d 62 | 65 72 2e 0d 0a 66 75 6e |ort numb|er...fun|
|000005d0| 63 74 69 6f 6e 20 69 6e | 74 20 47 65 74 53 65 72 |ction in|t GetSer|
|000005e0| 76 65 72 50 6f 72 74 28 | 29 0d 0a 7b 0d 0a 09 6c |verPort(|)..{...l|
|000005f0| 6f 63 61 6c 20 73 74 72 | 69 6e 67 5b 36 34 5d 20 |ocal str|ing[64] |
|00000600| 53 3b 0d 0a 09 6c 6f 63 | 61 6c 20 69 6e 74 20 69 |S;...loc|al int i|
|00000610| 3b 0d 0a 0d 0a 09 2f 2f | 20 46 69 67 75 72 65 20 |;.....//| Figure |
|00000620| 6f 75 74 20 74 68 65 20 | 73 65 72 76 65 72 27 73 |out the |server's|
|00000630| 20 70 6f 72 74 2e 0d 0a | 09 53 20 3d 20 4c 65 76 | port...|.S = Lev|
|00000640| 65 6c 2e 47 65 74 41 64 | 64 72 65 73 73 55 52 4c |el.GetAd|dressURL|
|00000650| 28 29 3b 0d 0a 09 69 20 | 3d 20 49 6e 53 74 72 28 |();...i |= InStr(|
|00000660| 20 53 2c 20 22 3a 22 20 | 29 3b 0d 0a 09 61 73 73 | S, ":" |);...ass|
|00000670| 65 72 74 28 69 3e 3d 30 | 29 3b 0d 0a 09 72 65 74 |ert(i>=0|);...ret|
|00000680| 75 72 6e 20 69 6e 74 28 | 4d 69 64 28 53 2c 69 2b |urn int(|Mid(S,i+|
|00000690| 31 29 29 3b 0d 0a 7d 0d | 0a 0d 0a 2f 2f 20 52 65 |1));..}.|...// Re|
|000006a0| 63 65 69 76 65 64 20 61 | 20 71 75 65 72 79 20 72 |ceived a| query r|
|000006b0| 65 71 75 65 73 74 2e 0d | 0a 65 76 65 6e 74 20 52 |equest..|.event R|
|000006c0| 65 63 65 69 76 65 64 54 | 65 78 74 28 49 70 41 64 |eceivedT|ext(IpAd|
|000006d0| 64 72 20 41 64 64 72 2c | 20 73 74 72 69 6e 67 5b |dr Addr,| string[|
|000006e0| 32 34 30 5d 20 54 65 78 | 74 29 0d 0a 7b 0d 0a 09 |240] Tex|t)..{...|
|000006f0| 6c 6f 63 61 6c 20 73 74 | 72 69 6e 67 5b 32 34 30 |local st|ring[240|
|00000700| 5d 20 51 75 65 72 79 3b | 0d 0a 09 6c 6f 63 61 6c |] Query;|...local|
|00000710| 20 62 6f 6f 6c 20 51 75 | 65 72 79 52 65 6d 61 69 | bool Qu|eryRemai|
|00000720| 6e 69 6e 67 3b 0d 0a 09 | 6c 6f 63 61 6c 20 69 6e |ning;...|local in|
|00000730| 74 20 20 51 75 65 72 79 | 4e 75 6d 2c 20 50 61 63 |t Query|Num, Pac|
|00000740| 6b 65 74 4e 75 6d 3b 0d | 0a 0d 0a 09 2f 2f 20 41 |ketNum;.|....// A|
|00000750| 73 73 69 67 6e 20 74 68 | 69 73 20 70 61 63 6b 65 |ssign th|is packe|
|00000760| 74 20 61 20 75 6e 69 71 | 75 65 20 76 61 6c 75 65 |t a uniq|ue value|
|00000770| 20 66 72 6f 6d 20 31 20 | 74 6f 20 31 30 30 0d 0a | from 1 |to 100..|
|00000780| 09 43 75 72 72 65 6e 74 | 51 75 65 72 79 4e 75 6d |.Current|QueryNum|
|00000790| 2b 2b 3b 0d 0a 09 69 66 | 20 28 43 75 72 72 65 6e |++;...if| (Curren|
|000007a0| 74 51 75 65 72 79 4e 75 | 6d 20 3e 20 31 30 30 29 |tQueryNu|m > 100)|
|000007b0| 0d 0a 09 09 43 75 72 72 | 65 6e 74 51 75 65 72 79 |....Curr|entQuery|
|000007c0| 4e 75 6d 20 3d 20 31 3b | 0d 0a 09 51 75 65 72 79 |Num = 1;|...Query|
|000007d0| 4e 75 6d 20 3d 20 43 75 | 72 72 65 6e 74 51 75 65 |Num = Cu|rrentQue|
|000007e0| 72 79 4e 75 6d 3b 0d 0a | 0d 0a 09 51 75 65 72 79 |ryNum;..|...Query|
|000007f0| 20 3d 20 54 65 78 74 3b | 0d 0a 09 69 66 20 28 51 | = Text;|...if (Q|
|00000800| 75 65 72 79 20 3d 3d 20 | 22 22 29 09 09 2f 2f 20 |uery == |"")..// |
|00000810| 49 66 20 74 68 65 20 73 | 74 72 69 6e 67 20 69 73 |If the s|tring is|
|00000820| 20 65 6d 70 74 79 2c 20 | 64 6f 6e 27 74 20 70 61 | empty, |don't pa|
|00000830| 72 73 65 20 69 74 0d 0a | 09 09 51 75 65 72 79 52 |rse it..|..QueryR|
|00000840| 65 6d 61 69 6e 69 6e 67 | 20 3d 20 66 61 6c 73 65 |emaining| = false|
|00000850| 3b 0d 0a 09 65 6c 73 65 | 0d 0a 09 09 51 75 65 72 |;...else|....Quer|
|00000860| 79 52 65 6d 61 69 6e 69 | 6e 67 20 3d 20 74 72 75 |yRemaini|ng = tru|
|00000870| 65 3b 0d 0a 09 0d 0a 09 | 77 68 69 6c 65 20 28 51 |e;......|while (Q|
|00000880| 75 65 72 79 52 65 6d 61 | 69 6e 69 6e 67 29 20 7b |ueryRema|ining) {|
|00000890| 0d 0a 09 09 51 75 65 72 | 79 20 3d 20 50 61 72 73 |....Quer|y = Pars|
|000008a0| 65 51 75 65 72 79 28 41 | 64 64 72 2c 20 51 75 65 |eQuery(A|ddr, Que|
|000008b0| 72 79 2c 20 51 75 65 72 | 79 4e 75 6d 2c 20 50 61 |ry, Quer|yNum, Pa|
|000008c0| 63 6b 65 74 4e 75 6d 29 | 3b 0d 0a 09 09 69 66 20 |cketNum)|;....if |
|000008d0| 28 51 75 65 72 79 20 3d | 3d 20 22 22 29 0d 0a 09 |(Query =|= "")...|
|000008e0| 09 09 51 75 65 72 79 52 | 65 6d 61 69 6e 69 6e 67 |..QueryR|emaining|
|000008f0| 20 3d 20 66 61 6c 73 65 | 3b 0d 0a 09 09 65 6c 73 | = false|;....els|
|00000900| 65 0d 0a 09 09 09 51 75 | 65 72 79 52 65 6d 61 69 |e.....Qu|eryRemai|
|00000910| 6e 69 6e 67 20 3d 20 74 | 72 75 65 3b 0d 0a 09 7d |ning = t|rue;...}|
|00000920| 0d 0a 7d 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |..}....f|unction |
|00000930| 73 74 72 69 6e 67 5b 32 | 34 30 5d 20 50 61 72 73 |string[2|40] Pars|
|00000940| 65 51 75 65 72 79 28 49 | 70 41 64 64 72 20 41 64 |eQuery(I|pAddr Ad|
|00000950| 64 72 2c 20 73 74 72 69 | 6e 67 5b 32 34 30 5d 20 |dr, stri|ng[240] |
|00000960| 51 75 65 72 79 2c 20 69 | 6e 74 20 51 75 65 72 79 |Query, i|nt Query|
|00000970| 4e 75 6d 2c 20 6f 75 74 | 20 69 6e 74 20 50 61 63 |Num, out| int Pac|
|00000980| 6b 65 74 4e 75 6d 29 0d | 0a 7b 0d 0a 09 6c 6f 63 |ketNum).|.{...loc|
|00000990| 61 6c 20 73 74 72 69 6e | 67 5b 32 34 30 5d 20 51 |al strin|g[240] Q|
|000009a0| 75 65 72 79 54 79 70 65 | 2c 20 51 75 65 72 79 56 |ueryType|, QueryV|
|000009b0| 61 6c 75 65 2c 20 51 75 | 65 72 79 52 65 73 74 2c |alue, Qu|eryRest,|
|000009c0| 20 56 61 6c 69 64 61 74 | 69 6f 6e 53 74 72 69 6e | Validat|ionStrin|
|000009d0| 67 3b 0d 0a 09 6c 6f 63 | 61 6c 20 62 6f 6f 6c 20 |g;...loc|al bool |
|000009e0| 52 65 73 75 6c 74 3b 0d | 0a 09 6c 6f 63 61 6c 20 |Result;.|..local |
|000009f0| 73 74 72 69 6e 67 5b 33 | 32 5d 20 46 69 6e 61 6c |string[3|2] Final|
|00000a00| 50 61 63 6b 65 74 3b 0d | 0a 09 0d 0a 09 52 65 73 |Packet;.|.....Res|
|00000a10| 75 6c 74 20 3d 20 50 61 | 72 73 65 4e 65 78 74 51 |ult = Pa|rseNextQ|
|00000a20| 75 65 72 79 28 51 75 65 | 72 79 2c 20 51 75 65 72 |uery(Que|ry, Quer|
|00000a30| 79 54 79 70 65 2c 20 51 | 75 65 72 79 56 61 6c 75 |yType, Q|ueryValu|
|00000a40| 65 2c 20 51 75 65 72 79 | 52 65 73 74 2c 20 46 69 |e, Query|Rest, Fi|
|00000a50| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 69 66 |nalPacke|t);...if|
|00000a60| 28 20 21 52 65 73 75 6c | 74 20 29 0d 0a 09 09 72 |( !Resul|t )....r|
|00000a70| 65 74 75 72 6e 20 22 22 | 3b 0d 0a 0d 0a 09 73 77 |eturn ""|;.....sw|
|00000a80| 69 74 63 68 28 20 51 75 | 65 72 79 54 79 70 65 20 |itch( Qu|eryType |
|00000a90| 29 0d 0a 09 7b 0d 0a 09 | 09 63 61 73 65 20 22 62 |)...{...|.case "b|
|00000aa0| 61 73 69 63 22 3a 0d 0a | 09 09 09 52 65 73 75 6c |asic":..|...Resul|
|00000ab0| 74 20 3d 20 53 65 6e 64 | 51 75 65 72 79 50 61 63 |t = Send|QueryPac|
|00000ac0| 6b 65 74 28 41 64 64 72 | 2c 20 47 65 74 42 61 73 |ket(Addr|, GetBas|
|00000ad0| 69 63 28 29 2c 20 51 75 | 65 72 79 4e 75 6d 2c 20 |ic(), Qu|eryNum, |
|00000ae0| 2b 2b 50 61 63 6b 65 74 | 4e 75 6d 2c 20 46 69 6e |++Packet|Num, Fin|
|00000af0| 61 6c 50 61 63 6b 65 74 | 29 3b 0d 0a 09 09 09 62 |alPacket|);.....b|
|00000b00| 72 65 61 6b 3b 0d 0a 09 | 09 63 61 73 65 20 22 69 |reak;...|.case "i|
|00000b10| 6e 66 6f 22 3a 0d 0a 09 | 09 09 52 65 73 75 6c 74 |nfo":...|..Result|
|00000b20| 20 3d 20 53 65 6e 64 51 | 75 65 72 79 50 61 63 6b | = SendQ|ueryPack|
|00000b30| 65 74 28 41 64 64 72 2c | 20 47 65 74 49 6e 66 6f |et(Addr,| GetInfo|
|00000b40| 28 29 2c 20 51 75 65 72 | 79 4e 75 6d 2c 20 2b 2b |(), Quer|yNum, ++|
|00000b50| 50 61 63 6b 65 74 4e 75 | 6d 2c 20 46 69 6e 61 6c |PacketNu|m, Final|
|00000b60| 50 61 63 6b 65 74 29 3b | 0d 0a 09 09 09 62 72 65 |Packet);|.....bre|
|00000b70| 61 6b 3b 0d 0a 09 09 63 | 61 73 65 20 22 72 75 6c |ak;....c|ase "rul|
|00000b80| 65 73 22 3a 0d 0a 09 09 | 09 52 65 73 75 6c 74 20 |es":....|.Result |
|00000b90| 3d 20 53 65 6e 64 51 75 | 65 72 79 50 61 63 6b 65 |= SendQu|eryPacke|
|00000ba0| 74 28 41 64 64 72 2c 20 | 47 65 74 52 75 6c 65 73 |t(Addr, |GetRules|
|00000bb0| 28 29 2c 20 51 75 65 72 | 79 4e 75 6d 2c 20 2b 2b |(), Quer|yNum, ++|
|00000bc0| 50 61 63 6b 65 74 4e 75 | 6d 2c 20 46 69 6e 61 6c |PacketNu|m, Final|
|00000bd0| 50 61 63 6b 65 74 29 3b | 0d 0a 09 09 09 62 72 65 |Packet);|.....bre|
|00000be0| 61 6b 3b 0d 0a 09 09 63 | 61 73 65 20 22 70 6c 61 |ak;....c|ase "pla|
|00000bf0| 79 65 72 73 22 3a 0d 0a | 09 09 09 69 66 28 20 44 |yers":..|...if( D|
|00000c00| 65 61 74 68 4d 61 74 63 | 68 47 61 6d 65 28 4c 65 |eathMatc|hGame(Le|
|00000c10| 76 65 6c 2e 47 61 6d 65 | 29 21 3d 4e 6f 6e 65 20 |vel.Game|)!=None |
|00000c20| 26 26 20 44 65 61 74 68 | 4d 61 74 63 68 47 61 6d |&& Death|MatchGam|
|00000c30| 65 28 4c 65 76 65 6c 2e | 47 61 6d 65 29 2e 4e 75 |e(Level.|Game).Nu|
|00000c40| 6d 50 6c 61 79 65 72 73 | 20 3e 20 30 20 29 0d 0a |mPlayers| > 0 )..|
|00000c50| 09 09 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|00000c60| 64 50 6c 61 79 65 72 73 | 28 41 64 64 72 2c 20 51 |dPlayers|(Addr, Q|
|00000c70| 75 65 72 79 4e 75 6d 2c | 20 50 61 63 6b 65 74 4e |ueryNum,| PacketN|
|00000c80| 75 6d 2c 20 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 |um, Fina|lPacket)|
|00000c90| 3b 0d 0a 09 09 09 65 6c | 73 65 0d 0a 09 09 09 09 |;.....el|se......|
|00000ca0| 52 65 73 75 6c 74 20 3d | 20 53 65 6e 64 51 75 65 |Result =| SendQue|
|00000cb0| 72 79 50 61 63 6b 65 74 | 28 41 64 64 72 2c 20 22 |ryPacket|(Addr, "|
|00000cc0| 22 2c 20 51 75 65 72 79 | 4e 75 6d 2c 20 50 61 63 |", Query|Num, Pac|
|00000cd0| 6b 65 74 4e 75 6d 2c 20 | 46 69 6e 61 6c 50 61 63 |ketNum, |FinalPac|
|00000ce0| 6b 65 74 29 3b 0d 0a 09 | 09 09 62 72 65 61 6b 3b |ket);...|..break;|
|00000cf0| 0d 0a 09 09 63 61 73 65 | 20 22 73 74 61 74 75 73 |....case| "status|
|00000d00| 22 3a 0d 0a 09 09 09 52 | 65 73 75 6c 74 20 3d 20 |":.....R|esult = |
|00000d10| 53 65 6e 64 51 75 65 72 | 79 50 61 63 6b 65 74 28 |SendQuer|yPacket(|
|00000d20| 41 64 64 72 2c 20 47 65 | 74 42 61 73 69 63 28 29 |Addr, Ge|tBasic()|
|00000d30| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 2b 2b 50 61 |, QueryN|um, ++Pa|
|00000d40| 63 6b 65 74 4e 75 6d 2c | 20 22 22 29 3b 0d 0a 09 |cketNum,| "");...|
|00000d50| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 51 |..Result| = SendQ|
|00000d60| 75 65 72 79 50 61 63 6b | 65 74 28 41 64 64 72 2c |ueryPack|et(Addr,|
|00000d70| 20 47 65 74 49 6e 66 6f | 28 29 2c 20 51 75 65 72 | GetInfo|(), Quer|
|00000d80| 79 4e 75 6d 2c 20 2b 2b | 50 61 63 6b 65 74 4e 75 |yNum, ++|PacketNu|
|00000d90| 6d 2c 20 22 22 29 3b 0d | 0a 09 09 09 69 66 28 20 |m, "");.|....if( |
|00000da0| 44 65 61 74 68 4d 61 74 | 63 68 47 61 6d 65 28 4c |DeathMat|chGame(L|
|00000db0| 65 76 65 6c 2e 47 61 6d | 65 29 21 3d 4e 6f 6e 65 |evel.Gam|e)!=None|
|00000dc0| 20 26 26 20 44 65 61 74 | 68 4d 61 74 63 68 47 61 | && Deat|hMatchGa|
|00000dd0| 6d 65 28 4c 65 76 65 6c | 2e 47 61 6d 65 29 2e 4e |me(Level|.Game).N|
|00000de0| 75 6d 50 6c 61 79 65 72 | 73 20 3d 3d 20 30 20 29 |umPlayer|s == 0 )|
|00000df0| 0d 0a 09 09 09 7b 0d 0a | 09 09 09 09 52 65 73 75 |.....{..|....Resu|
|00000e00| 6c 74 20 3d 20 53 65 6e | 64 51 75 65 72 79 50 61 |lt = Sen|dQueryPa|
|00000e10| 63 6b 65 74 28 41 64 64 | 72 2c 20 47 65 74 52 75 |cket(Add|r, GetRu|
|00000e20| 6c 65 73 28 29 2c 20 51 | 75 65 72 79 4e 75 6d 2c |les(), Q|ueryNum,|
|00000e30| 20 2b 2b 50 61 63 6b 65 | 74 4e 75 6d 2c 20 46 69 | ++Packe|tNum, Fi|
|00000e40| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 09 09 |nalPacke|t);.....|
|00000e50| 7d 0d 0a 09 09 09 65 6c | 73 65 0d 0a 09 09 09 7b |}.....el|se.....{|
|00000e60| 0d 0a 09 09 09 09 52 65 | 73 75 6c 74 20 3d 20 53 |......Re|sult = S|
|00000e70| 65 6e 64 51 75 65 72 79 | 50 61 63 6b 65 74 28 41 |endQuery|Packet(A|
|00000e80| 64 64 72 2c 20 47 65 74 | 52 75 6c 65 73 28 29 2c |ddr, Get|Rules(),|
|00000e90| 20 51 75 65 72 79 4e 75 | 6d 2c 20 2b 2b 50 61 63 | QueryNu|m, ++Pac|
|00000ea0| 6b 65 74 4e 75 6d 2c 20 | 22 22 29 3b 0d 0a 09 09 |ketNum, |"");....|
|00000eb0| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 50 |..Result| = SendP|
|00000ec0| 6c 61 79 65 72 73 28 41 | 64 64 72 2c 20 51 75 65 |layers(A|ddr, Que|
|00000ed0| 72 79 4e 75 6d 2c 20 50 | 61 63 6b 65 74 4e 75 6d |ryNum, P|acketNum|
|00000ee0| 2c 20 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d |, FinalP|acket);.|
|00000ef0| 0a 09 09 09 7d 0d 0a 09 | 09 09 62 72 65 61 6b 3b |....}...|..break;|
|00000f00| 0d 0a 09 09 63 61 73 65 | 20 22 65 63 68 6f 22 3a |....case| "echo":|
|00000f10| 0d 0a 09 09 09 2f 2f 20 | 52 65 73 70 6f 6e 64 20 |.....// |Respond |
|00000f20| 74 6f 20 61 6e 20 65 63 | 68 6f 20 77 69 74 68 20 |to an ec|ho with |
|00000f30| 74 68 65 20 73 61 6d 65 | 20 73 74 72 69 6e 67 0d |the same| string.|
|00000f40| 0a 09 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|00000f50| 64 51 75 65 72 79 50 61 | 63 6b 65 74 28 41 64 64 |dQueryPa|cket(Add|
|00000f60| 72 2c 20 22 5c 5c 65 63 | 68 6f 5c 5c 22 24 51 75 |r, "\\ec|ho\\"$Qu|
|00000f70| 65 72 79 56 61 6c 75 65 | 2c 20 51 75 65 72 79 4e |eryValue|, QueryN|
|00000f80| 75 6d 2c 20 2b 2b 50 61 | 63 6b 65 74 4e 75 6d 2c |um, ++Pa|cketNum,|
|00000f90| 20 46 69 6e 61 6c 50 61 | 63 6b 65 74 29 3b 0d 0a | FinalPa|cket);..|
|00000fa0| 09 09 09 62 72 65 61 6b | 3b 0d 0a 09 09 63 61 73 |...break|;....cas|
|00000fb0| 65 20 22 73 65 63 75 72 | 65 22 3a 0d 0a 09 09 09 |e "secur|e":.....|
|00000fc0| 56 61 6c 69 64 61 74 69 | 6f 6e 53 74 72 69 6e 67 |Validati|onString|
|00000fd0| 20 3d 20 22 5c 5c 76 61 | 6c 69 64 61 74 65 5c 5c | = "\\va|lidate\\|
|00000fe0| 22 24 56 61 6c 69 64 61 | 74 65 28 51 75 65 72 79 |"$Valida|te(Query|
|00000ff0| 56 61 6c 75 65 29 3b 0d | 0a 09 09 09 52 65 73 75 |Value);.|....Resu|
|00001000| 6c 74 20 3d 20 53 65 6e | 64 51 75 65 72 79 50 61 |lt = Sen|dQueryPa|
|00001010| 63 6b 65 74 28 41 64 64 | 72 2c 20 56 61 6c 69 64 |cket(Add|r, Valid|
|00001020| 61 74 69 6f 6e 53 74 72 | 69 6e 67 2c 20 51 75 65 |ationStr|ing, Que|
|00001030| 72 79 4e 75 6d 2c 20 2b | 2b 50 61 63 6b 65 74 4e |ryNum, +|+PacketN|
|00001040| 75 6d 2c 20 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 |um, Fina|lPacket)|
|00001050| 3b 0d 0a 09 09 09 62 72 | 65 61 6b 3b 0d 0a 09 09 |;.....br|eak;....|
|00001060| 63 61 73 65 20 22 6c 65 | 76 65 6c 5f 70 72 6f 70 |case "le|vel_prop|
|00001070| 65 72 74 79 22 3a 0d 0a | 09 09 09 52 65 73 75 6c |erty":..|...Resul|
|00001080| 74 20 3d 20 53 65 6e 64 | 51 75 65 72 79 50 61 63 |t = Send|QueryPac|
|00001090| 6b 65 74 28 41 64 64 72 | 2c 20 47 65 74 4c 65 76 |ket(Addr|, GetLev|
|000010a0| 65 6c 50 72 6f 70 65 72 | 74 79 28 51 75 65 72 79 |elProper|ty(Query|
|000010b0| 56 61 6c 75 65 29 2c 20 | 51 75 65 72 79 4e 75 6d |Value), |QueryNum|
|000010c0| 2c 20 2b 2b 50 61 63 6b | 65 74 4e 75 6d 2c 20 46 |, ++Pack|etNum, F|
|000010d0| 69 6e 61 6c 50 61 63 6b | 65 74 29 3b 0d 0a 09 09 |inalPack|et);....|
|000010e0| 09 62 72 65 61 6b 3b 0d | 0a 09 09 63 61 73 65 20 |.break;.|...case |
|000010f0| 22 67 61 6d 65 5f 70 72 | 6f 70 65 72 74 79 22 3a |"game_pr|operty":|
|00001100| 0d 0a 09 09 09 52 65 73 | 75 6c 74 20 3d 20 53 65 |.....Res|ult = Se|
|00001110| 6e 64 51 75 65 72 79 50 | 61 63 6b 65 74 28 41 64 |ndQueryP|acket(Ad|
|00001120| 64 72 2c 20 47 65 74 47 | 61 6d 65 50 72 6f 70 65 |dr, GetG|amePrope|
|00001130| 72 74 79 28 51 75 65 72 | 79 56 61 6c 75 65 29 2c |rty(Quer|yValue),|
|00001140| 20 51 75 65 72 79 4e 75 | 6d 2c 20 2b 2b 50 61 63 | QueryNu|m, ++Pac|
|00001150| 6b 65 74 4e 75 6d 2c 20 | 46 69 6e 61 6c 50 61 63 |ketNum, |FinalPac|
|00001160| 6b 65 74 29 3b 0d 0a 09 | 09 09 62 72 65 61 6b 3b |ket);...|..break;|
|00001170| 0d 0a 09 09 63 61 73 65 | 20 22 70 6c 61 79 65 72 |....case| "player|
|00001180| 5f 70 72 6f 70 65 72 74 | 79 22 3a 0d 0a 09 09 09 |_propert|y":.....|
|00001190| 52 65 73 75 6c 74 20 3d | 20 53 65 6e 64 51 75 65 |Result =| SendQue|
|000011a0| 72 79 50 61 63 6b 65 74 | 28 41 64 64 72 2c 20 47 |ryPacket|(Addr, G|
|000011b0| 65 74 50 6c 61 79 65 72 | 50 72 6f 70 65 72 74 79 |etPlayer|Property|
|000011c0| 28 51 75 65 72 79 56 61 | 6c 75 65 29 2c 20 51 75 |(QueryVa|lue), Qu|
|000011d0| 65 72 79 4e 75 6d 2c 20 | 2b 2b 50 61 63 6b 65 74 |eryNum, |++Packet|
|000011e0| 4e 75 6d 2c 20 46 69 6e | 61 6c 50 61 63 6b 65 74 |Num, Fin|alPacket|
|000011f0| 29 3b 0d 0a 09 09 09 62 | 72 65 61 6b 3b 0d 0a 09 |);.....b|reak;...|
|00001200| 09 64 65 66 61 75 6c 74 | 3a 0d 0a 09 09 09 62 72 |.default|:.....br|
|00001210| 65 61 6b 3b 0d 0a 09 7d | 0d 0a 09 69 66 28 20 52 |eak;...}|...if( R|
|00001220| 65 73 75 6c 74 20 29 0d | 0a 09 09 4c 6f 67 28 22 |esult ).|...Log("|
|00001230| 55 64 70 53 65 72 76 65 | 72 51 75 65 72 79 3a 20 |UdpServe|rQuery: |
|00001240| 45 72 72 6f 72 20 72 65 | 73 70 6f 6e 64 69 6e 67 |Error re|sponding|
|00001250| 20 74 6f 20 71 75 65 72 | 79 2e 22 29 3b 0d 0a 09 | to quer|y.");...|
|00001260| 72 65 74 75 72 6e 20 51 | 75 65 72 79 52 65 73 74 |return Q|ueryRest|
|00001270| 3b 0d 0a 7d 0d 0a 0d 0a | 2f 2f 20 53 65 6e 64 51 |;..}....|// SendQ|
|00001280| 75 65 72 79 50 61 63 6b | 65 74 20 69 73 20 61 20 |ueryPack|et is a |
|00001290| 77 72 61 70 70 65 72 20 | 66 6f 72 20 53 65 6e 64 |wrapper |for Send|
|000012a0| 54 65 78 74 20 74 68 61 | 74 20 61 6c 6c 6f 77 73 |Text tha|t allows|
|000012b0| 20 66 6f 72 20 70 61 63 | 6b 65 74 20 6e 75 6d 62 | for pac|ket numb|
|000012c0| 65 72 69 6e 67 2e 0d 0a | 66 75 6e 63 74 69 6f 6e |ering...|function|
|000012d0| 20 62 6f 6f 6c 20 53 65 | 6e 64 51 75 65 72 79 50 | bool Se|ndQueryP|
|000012e0| 61 63 6b 65 74 28 49 70 | 41 64 64 72 20 41 64 64 |acket(Ip|Addr Add|
|000012f0| 72 2c 20 73 74 72 69 6e | 67 5b 32 34 30 5d 20 53 |r, strin|g[240] S|
|00001300| 65 6e 64 53 74 72 69 6e | 67 2c 20 69 6e 74 20 51 |endStrin|g, int Q|
|00001310| 75 65 72 79 4e 75 6d 2c | 20 69 6e 74 20 50 61 63 |ueryNum,| int Pac|
|00001320| 6b 65 74 4e 75 6d 2c 20 | 73 74 72 69 6e 67 5b 33 |ketNum, |string[3|
|00001330| 32 5d 20 46 69 6e 61 6c | 50 61 63 6b 65 74 29 0d |2] Final|Packet).|
|00001340| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 62 6f 6f 6c 20 |.{...loc|al bool |
|00001350| 52 65 73 75 6c 74 3b 0d | 0a 09 69 66 20 28 46 69 |Result;.|..if (Fi|
|00001360| 6e 61 6c 50 61 63 6b 65 | 74 20 3d 3d 20 22 66 69 |nalPacke|t == "fi|
|00001370| 6e 61 6c 22 29 20 7b 0d | 0a 09 09 53 65 6e 64 53 |nal") {.|...SendS|
|00001380| 74 72 69 6e 67 20 3d 20 | 53 65 6e 64 53 74 72 69 |tring = |SendStri|
|00001390| 6e 67 24 22 5c 5c 66 69 | 6e 61 6c 5c 5c 22 3b 0d |ng$"\\fi|nal\\";.|
|000013a0| 0a 09 7d 0d 0a 09 53 65 | 6e 64 53 74 72 69 6e 67 |..}...Se|ndString|
|000013b0| 20 3d 20 53 65 6e 64 53 | 74 72 69 6e 67 24 22 5c | = SendS|tring$"\|
|000013c0| 5c 71 75 65 72 79 69 64 | 5c 5c 22 24 51 75 65 72 |\queryid|\\"$Quer|
|000013d0| 79 4e 75 6d 24 22 2e 22 | 24 50 61 63 6b 65 74 4e |yNum$"."|$PacketN|
|000013e0| 75 6d 3b 0d 0a 0d 0a 09 | 52 65 73 75 6c 74 20 3d |um;.....|Result =|
|000013f0| 20 53 65 6e 64 54 65 78 | 74 28 41 64 64 72 2c 20 | SendTex|t(Addr, |
|00001400| 53 65 6e 64 53 74 72 69 | 6e 67 29 3b 0d 0a 0d 0a |SendStri|ng);....|
|00001410| 09 72 65 74 75 72 6e 20 | 52 65 73 75 6c 74 3b 0d |.return |Result;.|
|00001420| 0a 7d 0d 0a 0d 0a 2f 2f | 20 52 65 74 75 72 6e 20 |.}....//| Return |
|00001430| 61 20 73 74 72 69 6e 67 | 20 6f 66 20 62 61 73 69 |a string| of basi|
|00001440| 63 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2e 0d 0a |c inform|ation...|
|00001450| 66 75 6e 63 74 69 6f 6e | 20 73 74 72 69 6e 67 5b |function| string[|
|00001460| 32 34 30 5d 20 47 65 74 | 42 61 73 69 63 28 29 20 |240] Get|Basic() |
|00001470| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 73 74 72 69 6e 67 |{...loca|l string|
|00001480| 5b 32 34 30 5d 20 52 65 | 73 75 6c 74 53 65 74 3b |[240] Re|sultSet;|
|00001490| 0d 0a 0d 0a 09 2f 2f 20 | 54 68 65 20 6e 61 6d 65 |.....// |The name|
|000014a0| 20 6f 66 20 74 68 69 73 | 20 67 61 6d 65 2e 0d 0a | of this| game...|
|000014b0| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 22 5c 5c |.ResultS|et = "\\|
|000014c0| 67 61 6d 65 6e 61 6d 65 | 5c 5c 75 6e 72 65 61 6c |gamename|\\unreal|
|000014d0| 22 3b 0d 0a 0d 0a 09 2f | 2f 20 54 68 65 20 76 65 |";...../|/ The ve|
|000014e0| 72 73 69 6f 6e 20 6f 66 | 20 74 68 69 73 20 67 61 |rsion of| this ga|
|000014f0| 6d 65 2e 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |me....Re|sultSet |
|00001500| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 67 |= Result|Set$"\\g|
|00001510| 61 6d 65 76 65 72 5c 5c | 22 24 4c 65 76 65 6c 2e |amever\\|"$Level.|
|00001520| 45 6e 67 69 6e 65 56 65 | 72 73 69 6f 6e 3b 0d 0a |EngineVe|rsion;..|
|00001530| 0d 0a 09 2f 2f 20 54 68 | 65 20 72 65 67 69 6f 6e |...// Th|e region|
|00001540| 61 6c 20 6c 6f 63 61 74 | 69 6f 6e 20 6f 66 20 74 |al locat|ion of t|
|00001550| 68 69 73 20 67 61 6d 65 | 2e 0d 0a 09 52 65 73 75 |his game|....Resu|
|00001560| 6c 74 53 65 74 20 3d 20 | 52 65 73 75 6c 74 53 65 |ltSet = |ResultSe|
|00001570| 74 24 22 5c 5c 6c 6f 63 | 61 74 69 6f 6e 5c 5c 22 |t$"\\loc|ation\\"|
|00001580| 24 52 65 67 69 6f 6e 3b | 0d 0a 09 0d 0a 09 72 65 |$Region;|......re|
|00001590| 74 75 72 6e 20 52 65 73 | 75 6c 74 53 65 74 3b 0d |turn Res|ultSet;.|
|000015a0| 0a 7d 0d 0a 0d 0a 2f 2f | 20 52 65 74 75 72 6e 20 |.}....//| Return |
|000015b0| 61 20 73 74 72 69 6e 67 | 20 6f 66 20 69 6d 70 6f |a string| of impo|
|000015c0| 72 74 61 6e 74 20 73 79 | 73 74 65 6d 20 69 6e 66 |rtant sy|stem inf|
|000015d0| 6f 72 6d 61 74 69 6f 6e | 2e 0d 0a 66 75 6e 63 74 |ormation|...funct|
|000015e0| 69 6f 6e 20 73 74 72 69 | 6e 67 5b 32 34 30 5d 20 |ion stri|ng[240] |
|000015f0| 47 65 74 49 6e 66 6f 28 | 29 20 7b 0d 0a 09 6c 6f |GetInfo(|) {...lo|
|00001600| 63 61 6c 20 73 74 72 69 | 6e 67 5b 32 34 30 5d 20 |cal stri|ng[240] |
|00001610| 52 65 73 75 6c 74 53 65 | 74 3b 0d 0a 09 0d 0a 09 |ResultSe|t;......|
|00001620| 2f 2f 20 54 68 65 20 73 | 65 72 76 65 72 20 6e 61 |// The s|erver na|
|00001630| 6d 65 2c 20 69 2e 65 2e | 3a 20 42 6f 62 92 73 20 |me, i.e.|: Bob.s |
|00001640| 53 65 72 76 65 72 0d 0a | 09 52 65 73 75 6c 74 53 |Server..|.ResultS|
|00001650| 65 74 20 3d 20 22 5c 5c | 68 6f 73 74 6e 61 6d 65 |et = "\\|hostname|
|00001660| 5c 5c 22 24 53 65 72 76 | 65 72 4e 61 6d 65 3b 0d |\\"$Serv|erName;.|
|00001670| 0a 0d 0a 09 2f 2f 20 54 | 68 65 20 73 65 72 76 65 |....// T|he serve|
|00001680| 72 20 70 6f 72 74 2e 0d | 0a 09 52 65 73 75 6c 74 |r port..|..Result|
|00001690| 53 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |Set = Re|sultSet$|
|000016a0| 22 5c 5c 68 6f 73 74 70 | 6f 72 74 5c 5c 22 24 47 |"\\hostp|ort\\"$G|
|000016b0| 65 74 53 65 72 76 65 72 | 50 6f 72 74 28 29 3b 0d |etServer|Port();.|
|000016c0| 0a 0d 0a 09 2f 2f 20 28 | 6f 70 74 69 6f 6e 61 6c |....// (|optional|
|000016d0| 29 20 54 68 65 20 73 65 | 72 76 65 72 20 49 50 0d |) The se|rver IP.|
|000016e0| 0a 09 2f 2f 20 69 66 20 | 28 53 65 72 76 65 72 49 |..// if |(ServerI|
|000016f0| 50 20 21 3d 20 22 22 29 | 0d 0a 09 2f 2f 09 52 65 |P != "")|...//.Re|
|00001700| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|00001710| 53 65 74 24 22 5c 5c 68 | 6f 73 74 69 70 5c 5c 22 |Set$"\\h|ostip\\"|
|00001720| 24 53 65 72 76 65 72 49 | 50 3b 0d 0a 0d 0a 09 2f |$ServerI|P;...../|
|00001730| 2f 20 54 68 65 20 6d 61 | 70 2f 6c 65 76 65 6c 20 |/ The ma|p/level |
|00001740| 6e 61 6d 65 0d 0a 09 52 | 65 73 75 6c 74 53 65 74 |name...R|esultSet|
|00001750| 20 3d 20 52 65 73 75 6c | 74 53 65 74 24 22 5c 5c | = Resul|tSet$"\\|
|00001760| 6d 61 70 6e 61 6d 65 5c | 5c 22 24 4c 65 76 65 6c |mapname\|\"$Level|
|00001770| 2e 54 69 74 6c 65 3b 0d | 0a 0d 0a 09 2f 2f 20 54 |.Title;.|....// T|
|00001780| 68 65 20 6d 6f 64 20 6f | 72 20 67 61 6d 65 20 74 |he mod o|r game t|
|00001790| 79 70 65 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |ype...Re|sultSet |
|000017a0| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 67 |= Result|Set$"\\g|
|000017b0| 61 6d 65 74 79 70 65 5c | 5c 22 24 4c 65 76 65 6c |ametype\|\"$Level|
|000017c0| 2e 47 61 6d 65 2e 43 6c | 61 73 73 3b 0d 0a 0d 0a |.Game.Cl|ass;....|
|000017d0| 09 69 66 28 20 44 65 61 | 74 68 4d 61 74 63 68 47 |.if( Dea|thMatchG|
|000017e0| 61 6d 65 28 4c 65 76 65 | 6c 2e 47 61 6d 65 29 21 |ame(Leve|l.Game)!|
|000017f0| 3d 4e 6f 6e 65 20 29 0d | 0a 09 7b 0d 0a 09 09 2f |=None ).|..{..../|
|00001800| 2f 20 54 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |/ The nu|mber of |
|00001810| 70 6c 61 79 65 72 73 0d | 0a 09 09 52 65 73 75 6c |players.|...Resul|
|00001820| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00001830| 24 22 5c 5c 6e 75 6d 70 | 6c 61 79 65 72 73 5c 5c |$"\\nump|layers\\|
|00001840| 22 24 44 65 61 74 68 4d | 61 74 63 68 47 61 6d 65 |"$DeathM|atchGame|
|00001850| 28 4c 65 76 65 6c 2e 47 | 61 6d 65 29 2e 4e 75 6d |(Level.G|ame).Num|
|00001860| 50 6c 61 79 65 72 73 3b | 0d 0a 0d 0a 09 09 2f 2f |Players;|......//|
|00001870| 20 54 68 65 20 6d 61 78 | 69 6d 75 6d 20 6e 75 6d | The max|imum num|
|00001880| 62 65 72 20 6f 66 20 70 | 6c 61 79 65 72 73 0d 0a |ber of p|layers..|
|00001890| 09 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|000018a0| 73 75 6c 74 53 65 74 24 | 22 5c 5c 6d 61 78 70 6c |sultSet$|"\\maxpl|
|000018b0| 61 79 65 72 73 5c 5c 22 | 24 44 65 61 74 68 4d 61 |ayers\\"|$DeathMa|
|000018c0| 74 63 68 47 61 6d 65 28 | 4c 65 76 65 6c 2e 47 61 |tchGame(|Level.Ga|
|000018d0| 6d 65 29 2e 4d 61 78 50 | 6c 61 79 65 72 73 3b 0d |me).MaxP|layers;.|
|000018e0| 0a 09 7d 0d 0a 0d 0a 09 | 2f 2f 20 54 68 65 20 67 |..}.....|// The g|
|000018f0| 61 6d 65 20 6d 6f 64 65 | 3a 20 6f 70 65 6e 70 6c |ame mode|: openpl|
|00001900| 61 79 69 6e 67 0d 0a 09 | 52 65 73 75 6c 74 53 65 |aying...|ResultSe|
|00001910| 74 20 3d 20 52 65 73 75 | 6c 74 53 65 74 24 22 5c |t = Resu|ltSet$"\|
|00001920| 5c 67 61 6d 65 6d 6f 64 | 65 5c 5c 6f 70 65 6e 70 |\gamemod|e\\openp|
|00001930| 6c 61 79 69 6e 67 22 3b | 0d 0a 0d 0a 09 72 65 74 |laying";|.....ret|
|00001940| 75 72 6e 20 52 65 73 75 | 6c 74 53 65 74 3b 0d 0a |urn Resu|ltSet;..|
|00001950| 7d 0d 0a 0d 0a 2f 2f 20 | 52 65 74 75 72 6e 20 61 |}....// |Return a|
|00001960| 20 73 74 72 69 6e 67 20 | 6f 66 20 6d 69 73 63 65 | string |of misce|
|00001970| 6c 6c 61 6e 65 6f 75 73 | 20 69 6e 66 6f 72 6d 61 |llaneous| informa|
|00001980| 74 69 6f 6e 2e 0d 0a 2f | 2f 20 47 61 6d 65 20 73 |tion.../|/ Game s|
|00001990| 70 65 63 69 66 69 63 20 | 69 6e 66 6f 72 6d 61 74 |pecific |informat|
|000019a0| 69 6f 6e 2c 20 75 73 65 | 72 20 64 65 66 69 6e 65 |ion, use|r define|
|000019b0| 64 20 64 61 74 61 2c 20 | 63 75 73 74 6f 6d 20 70 |d data, |custom p|
|000019c0| 61 72 61 6d 65 74 65 72 | 73 20 66 6f 72 20 74 68 |arameter|s for th|
|000019d0| 65 20 63 6f 6d 6d 61 6e | 64 20 6c 69 6e 65 2e 0d |e comman|d line..|
|000019e0| 0a 66 75 6e 63 74 69 6f | 6e 20 73 74 72 69 6e 67 |.functio|n string|
|000019f0| 5b 32 34 30 5d 20 47 65 | 74 52 75 6c 65 73 28 29 |[240] Ge|tRules()|
|00001a00| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 73 74 72 69 |..{...lo|cal stri|
|00001a10| 6e 67 5b 32 34 30 5d 20 | 52 65 73 75 6c 74 53 65 |ng[240] |ResultSe|
|00001a20| 74 3b 0d 0a 09 6c 6f 63 | 61 6c 20 44 65 61 74 68 |t;...loc|al Death|
|00001a30| 6d 61 74 63 68 47 61 6d | 65 20 44 4d 3b 0d 0a 09 |matchGam|e DM;...|
|00001a40| 44 4d 20 3d 20 44 65 61 | 74 68 6d 61 74 63 68 47 |DM = Dea|thmatchG|
|00001a50| 61 6d 65 28 4c 65 76 65 | 6c 2e 47 61 6d 65 29 3b |ame(Leve|l.Game);|
|00001a60| 0d 0a 09 69 66 28 20 44 | 4d 21 3d 4e 6f 6e 65 20 |...if( D|M!=None |
|00001a70| 29 0d 0a 09 7b 0d 0a 09 | 09 2f 2f 20 54 69 6d 65 |)...{...|.// Time|
|00001a80| 6c 69 6d 69 74 2e 0d 0a | 09 09 52 65 73 75 6c 74 |limit...|..Result|
|00001a90| 53 65 74 20 3d 20 22 5c | 5c 74 69 6d 65 6c 69 6d |Set = "\|\timelim|
|00001aa0| 69 74 5c 5c 22 24 44 4d | 2e 54 69 6d 65 4c 69 6d |it\\"$DM|.TimeLim|
|00001ab0| 69 74 3b 0d 0a 09 09 0d | 0a 09 09 2f 2f 20 46 72 |it;.....|...// Fr|
|00001ac0| 61 67 6c 69 6d 69 74 0d | 0a 09 09 52 65 73 75 6c |aglimit.|...Resul|
|00001ad0| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00001ae0| 24 22 5c 5c 66 72 61 67 | 6c 69 6d 69 74 5c 5c 22 |$"\\frag|limit\\"|
|00001af0| 24 44 4d 2e 46 72 61 67 | 4c 69 6d 69 74 3b 0d 0a |$DM.Frag|Limit;..|
|00001b00| 09 09 0d 0a 09 09 2f 2f | 20 42 6f 74 73 20 69 6e |......//| Bots in|
|00001b10| 20 4d 75 6c 74 69 70 6c | 61 79 3f 0d 0a 09 09 69 | Multipl|ay?....i|
|00001b20| 66 28 20 44 4d 2e 62 4d | 75 6c 74 69 70 6c 61 79 |f( DM.bM|ultiplay|
|00001b30| 65 72 42 6f 74 73 29 0d | 0a 09 09 09 52 65 73 75 |erBots).|....Resu|
|00001b40| 6c 74 73 65 74 20 3d 20 | 52 65 73 75 6c 74 53 65 |ltset = |ResultSe|
|00001b50| 74 24 22 5c 5c 4d 75 6c | 74 69 70 6c 61 79 65 72 |t$"\\Mul|tiplayer|
|00001b60| 42 6f 74 73 5c 5c 22 24 | 74 72 75 65 3b 0d 0a 09 |Bots\\"$|true;...|
|00001b70| 09 65 6c 73 65 0d 0a 09 | 09 09 52 65 73 75 6c 74 |.else...|..Result|
|00001b80| 73 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |set = Re|sultSet$|
|00001b90| 22 5c 5c 4d 75 6c 74 69 | 70 6c 61 79 65 72 42 6f |"\\Multi|playerBo|
|00001ba0| 74 73 5c 5c 22 24 66 61 | 6c 73 65 3b 0d 0a 0d 0a |ts\\"$fa|lse;....|
|00001bb0| 09 09 2f 2f 20 43 68 61 | 6e 67 65 20 6c 65 76 65 |..// Cha|nge leve|
|00001bc0| 6c 73 3f 0d 0a 09 09 69 | 66 28 20 44 4d 2e 62 43 |ls?....i|f( DM.bC|
|00001bd0| 68 61 6e 67 65 4c 65 76 | 65 6c 73 20 29 0d 0a 09 |hangeLev|els )...|
|00001be0| 09 09 52 65 73 75 6c 74 | 73 65 74 20 3d 20 52 65 |..Result|set = Re|
|00001bf0| 73 75 6c 74 53 65 74 24 | 22 5c 5c 43 68 61 6e 67 |sultSet$|"\\Chang|
|00001c00| 65 4c 65 76 65 6c 73 5c | 5c 22 24 74 72 75 65 3b |eLevels\|\"$true;|
|00001c10| 0d 0a 09 09 65 6c 73 65 | 0d 0a 09 09 09 52 65 73 |....else|.....Res|
|00001c20| 75 6c 74 73 65 74 20 3d | 20 52 65 73 75 6c 74 53 |ultset =| ResultS|
|00001c30| 65 74 24 22 5c 5c 43 68 | 61 6e 67 65 4c 65 76 65 |et$"\\Ch|angeLeve|
|00001c40| 6c 73 5c 5c 22 24 66 61 | 6c 73 65 3b 0d 0a 09 7d |ls\\"$fa|lse;...}|
|00001c50| 0d 0a 0d 0a 09 2f 2f 20 | 41 64 6d 69 6e 27 73 20 |.....// |Admin's |
|00001c60| 4e 61 6d 65 0d 0a 09 69 | 66 28 20 41 64 6d 69 6e |Name...i|f( Admin|
|00001c70| 4e 61 6d 65 20 21 3d 20 | 22 22 20 29 0d 0a 09 09 |Name != |"" )....|
|00001c80| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00001c90| 6c 74 53 65 74 24 22 5c | 5c 41 64 6d 69 6e 4e 61 |ltSet$"\|\AdminNa|
|00001ca0| 6d 65 5c 5c 22 24 41 64 | 6d 69 6e 4e 61 6d 65 3b |me\\"$Ad|minName;|
|00001cb0| 0d 0a 09 0d 0a 09 2f 2f | 20 41 64 6d 69 6e 27 73 |......//| Admin's|
|00001cc0| 20 45 6d 61 69 6c 0d 0a | 09 69 66 28 20 41 64 6d | Email..|.if( Adm|
|00001cd0| 69 6e 45 6d 61 69 6c 20 | 21 3d 20 22 22 20 29 0d |inEmail |!= "" ).|
|00001ce0| 0a 09 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|00001cf0| 65 73 75 6c 74 53 65 74 | 24 22 5c 5c 41 64 6d 69 |esultSet|$"\\Admi|
|00001d00| 6e 45 4d 61 69 6c 5c 5c | 22 24 41 64 6d 69 6e 45 |nEMail\\|"$AdminE|
|00001d10| 6d 61 69 6c 3b 0d 0a 0d | 0a 09 72 65 74 75 72 6e |mail;...|..return|
|00001d20| 20 52 65 73 75 6c 74 53 | 65 74 3b 0d 0a 7d 0d 0a | ResultS|et;..}..|
|00001d30| 0d 0a 2f 2f 20 52 65 74 | 75 72 6e 20 61 20 73 74 |..// Ret|urn a st|
|00001d40| 72 69 6e 67 20 6f 66 20 | 69 6e 66 6f 72 6d 61 74 |ring of |informat|
|00001d50| 69 6f 6e 20 6f 6e 20 61 | 20 70 6c 61 79 65 72 2e |ion on a| player.|
|00001d60| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 73 74 72 69 6e |..functi|on strin|
|00001d70| 67 5b 32 34 30 5d 20 47 | 65 74 50 6c 61 79 65 72 |g[240] G|etPlayer|
|00001d80| 28 20 50 6c 61 79 65 72 | 50 61 77 6e 20 50 2c 20 |( Player|Pawn P, |
|00001d90| 69 6e 74 20 50 6c 61 79 | 65 72 4e 75 6d 20 29 0d |int Play|erNum ).|
|00001da0| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e |.{...loc|al strin|
|00001db0| 67 5b 32 34 30 5d 20 52 | 65 73 75 6c 74 53 65 74 |g[240] R|esultSet|
|00001dc0| 3b 0d 0a 09 0d 0a 09 2f | 2f 20 4e 61 6d 65 0d 0a |;....../|/ Name..|
|00001dd0| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 22 5c 5c |.ResultS|et = "\\|
|00001de0| 70 6c 61 79 65 72 5f 22 | 24 50 6c 61 79 65 72 4e |player_"|$PlayerN|
|00001df0| 75 6d 24 22 5c 5c 22 24 | 50 2e 50 6c 61 79 65 72 |um$"\\"$|P.Player|
|00001e00| 4e 61 6d 65 3b 0d 0a 0d | 0a 09 2f 2f 20 46 72 61 |Name;...|..// Fra|
|00001e10| 67 73 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |gs...Res|ultSet =|
|00001e20| 20 52 65 73 75 6c 74 53 | 65 74 24 22 5c 5c 66 72 | ResultS|et$"\\fr|
|00001e30| 61 67 73 5f 22 24 50 6c | 61 79 65 72 4e 75 6d 24 |ags_"$Pl|ayerNum$|
|00001e40| 22 5c 5c 22 24 69 6e 74 | 28 50 2e 53 63 6f 72 65 |"\\"$int|(P.Score|
|00001e50| 29 3b 0d 0a 09 0d 0a 09 | 2f 2f 20 50 69 6e 67 0d |);......|// Ping.|
|00001e60| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|00001e70| 73 75 6c 74 53 65 74 24 | 22 5c 5c 70 69 6e 67 5f |sultSet$|"\\ping_|
|00001e80| 22 24 50 6c 61 79 65 72 | 4e 75 6d 24 22 5c 5c 22 |"$Player|Num$"\\"|
|00001e90| 24 50 2e 43 6f 6e 73 6f | 6c 65 43 6f 6d 6d 61 6e |$P.Conso|leComman|
|00001ea0| 64 52 65 73 75 6c 74 28 | 22 47 45 54 50 49 4e 47 |dResult(|"GETPING|
|00001eb0| 22 29 3b 0d 0a 09 0d 0a | 09 2f 2f 20 54 65 61 6d |");.....|.// Team|
|00001ec0| 0d 0a 09 52 65 73 75 6c | 74 53 65 74 20 3d 20 52 |...Resul|tSet = R|
|00001ed0| 65 73 75 6c 74 53 65 74 | 24 22 5c 5c 74 65 61 6d |esultSet|$"\\team|
|00001ee0| 5f 22 24 50 6c 61 79 65 | 72 4e 75 6d 24 22 5c 5c |_"$Playe|rNum$"\\|
|00001ef0| 22 24 50 2e 54 65 61 6d | 3b 0d 0a 09 0d 0a 09 2f |"$P.Team|;....../|
|00001f00| 2f 20 53 6b 69 6e 0d 0a | 09 52 65 73 75 6c 74 53 |/ Skin..|.ResultS|
|00001f10| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 22 |et = Res|ultSet$"|
|00001f20| 5c 5c 73 6b 69 6e 5f 22 | 24 50 6c 61 79 65 72 4e |\\skin_"|$PlayerN|
|00001f30| 75 6d 24 22 5c 5c 22 24 | 50 2e 53 6b 69 6e 3b 0d |um$"\\"$|P.Skin;.|
|00001f40| 0a 09 0d 0a 09 2f 2f 20 | 4d 65 73 68 0d 0a 09 52 |.....// |Mesh...R|
|00001f50| 65 73 75 6c 74 53 65 74 | 20 3d 20 52 65 73 75 6c |esultSet| = Resul|
|00001f60| 74 53 65 74 24 22 5c 5c | 6d 65 73 68 5f 22 24 50 |tSet$"\\|mesh_"$P|
|00001f70| 6c 61 79 65 72 4e 75 6d | 24 22 5c 5c 22 24 50 2e |layerNum|$"\\"$P.|
|00001f80| 4d 65 73 68 3b 0d 0a 09 | 0d 0a 09 2f 2f 20 54 69 |Mesh;...|...// Ti|
|00001f90| 6d 65 20 50 6c 61 79 69 | 6e 67 0d 0a 0d 0a 09 72 |me Playi|ng.....r|
|00001fa0| 65 74 75 72 6e 20 52 65 | 73 75 6c 74 53 65 74 3b |eturn Re|sultSet;|
|00001fb0| 0d 0a 7d 0d 0a 0d 0a 2f | 2f 20 53 65 6e 64 20 64 |..}..../|/ Send d|
|00001fc0| 61 74 61 20 66 6f 72 20 | 65 61 63 68 20 70 6c 61 |ata for |each pla|
|00001fd0| 79 65 72 0d 0a 66 75 6e | 63 74 69 6f 6e 20 62 6f |yer..fun|ction bo|
|00001fe0| 6f 6c 20 53 65 6e 64 50 | 6c 61 79 65 72 73 28 49 |ol SendP|layers(I|
|00001ff0| 70 41 64 64 72 20 41 64 | 64 72 2c 20 69 6e 74 20 |pAddr Ad|dr, int |
|00002000| 51 75 65 72 79 4e 75 6d | 2c 20 6f 75 74 20 69 6e |QueryNum|, out in|
|00002010| 74 20 50 61 63 6b 65 74 | 4e 75 6d 2c 20 73 74 72 |t Packet|Num, str|
|00002020| 69 6e 67 5b 33 32 5d 20 | 46 69 6e 61 6c 50 61 63 |ing[32] |FinalPac|
|00002030| 6b 65 74 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |ket)..{.|..local |
|00002040| 50 61 77 6e 20 50 3b 0d | 0a 09 6c 6f 63 61 6c 20 |Pawn P;.|..local |
|00002050| 69 6e 74 20 69 3b 0d 0a | 09 6c 6f 63 61 6c 20 62 |int i;..|.local b|
|00002060| 6f 6f 6c 20 52 65 73 75 | 6c 74 2c 20 53 65 6e 64 |ool Resu|lt, Send|
|00002070| 52 65 73 75 6c 74 3b 0d | 0a 09 6c 6f 63 61 6c 20 |Result;.|..local |
|00002080| 44 65 61 74 68 4d 61 74 | 63 68 47 61 6d 65 20 44 |DeathMat|chGame D|
|00002090| 4d 3b 0d 0a 09 0d 0a 09 | 52 65 73 75 6c 74 20 3d |M;......|Result =|
|000020a0| 20 66 61 6c 73 65 3b 0d | 0a 0d 0a 09 50 20 3d 20 | false;.|....P = |
|000020b0| 4c 65 76 65 6c 2e 50 61 | 77 6e 4c 69 73 74 3b 0d |Level.Pa|wnList;.|
|000020c0| 0a 09 44 4d 20 3d 20 44 | 65 61 74 68 4d 61 74 63 |..DM = D|eathMatc|
|000020d0| 68 47 61 6d 65 28 4c 65 | 76 65 6c 2e 47 61 6d 65 |hGame(Le|vel.Game|
|000020e0| 29 3b 0d 0a 09 69 66 28 | 20 44 4d 21 3d 4e 6f 6e |);...if(| DM!=Non|
|000020f0| 65 20 29 0d 0a 09 7b 0d | 0a 09 09 77 68 69 6c 65 |e )...{.|...while|
|00002100| 28 20 69 20 3c 20 44 4d | 2e 4e 75 6d 50 6c 61 79 |( i < DM|.NumPlay|
|00002110| 65 72 73 20 29 0d 0a 09 | 09 7b 0d 0a 09 09 09 69 |ers )...|.{.....i|
|00002120| 66 20 28 50 2e 49 73 41 | 28 27 50 6c 61 79 65 72 |f (P.IsA|('Player|
|00002130| 50 61 77 6e 27 29 29 0d | 0a 09 09 09 7b 0d 0a 09 |Pawn')).|....{...|
|00002140| 09 09 09 69 66 28 20 69 | 3d 3d 44 4d 2e 4e 75 6d |...if( i|==DM.Num|
|00002150| 50 6c 61 79 65 72 73 2d | 31 20 26 26 20 46 69 6e |Players-|1 && Fin|
|00002160| 61 6c 50 61 63 6b 65 74 | 3d 3d 22 66 69 6e 61 6c |alPacket|=="final|
|00002170| 22 20 29 0d 0a 09 09 09 | 09 09 53 65 6e 64 52 65 |" ).....|..SendRe|
|00002180| 73 75 6c 74 20 3d 20 53 | 65 6e 64 51 75 65 72 79 |sult = S|endQuery|
|00002190| 50 61 63 6b 65 74 28 41 | 64 64 72 2c 20 47 65 74 |Packet(A|ddr, Get|
|000021a0| 50 6c 61 79 65 72 28 50 | 6c 61 79 65 72 50 61 77 |Player(P|layerPaw|
|000021b0| 6e 28 50 29 2c 20 69 29 | 2c 20 51 75 65 72 79 4e |n(P), i)|, QueryN|
|000021c0| 75 6d 2c 20 2b 2b 50 61 | 63 6b 65 74 4e 75 6d 2c |um, ++Pa|cketNum,|
|000021d0| 20 22 66 69 6e 61 6c 22 | 29 3b 0d 0a 09 09 09 09 | "final"|);......|
|000021e0| 65 6c 73 65 0d 0a 09 09 | 09 09 09 53 65 6e 64 52 |else....|...SendR|
|000021f0| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|00002200| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|00002210| 74 50 6c 61 79 65 72 28 | 50 6c 61 79 65 72 50 61 |tPlayer(|PlayerPa|
|00002220| 77 6e 28 50 29 2c 20 69 | 29 2c 20 51 75 65 72 79 |wn(P), i|), Query|
|00002230| 4e 75 6d 2c 20 2b 2b 50 | 61 63 6b 65 74 4e 75 6d |Num, ++P|acketNum|
|00002240| 2c 20 22 22 29 3b 0d 0a | 09 09 09 09 52 65 73 75 |, "");..|....Resu|
|00002250| 6c 74 20 3d 20 53 65 6e | 64 52 65 73 75 6c 74 20 |lt = Sen|dResult |
|00002260| 7c 7c 20 52 65 73 75 6c | 74 3b 0d 0a 09 09 09 09 ||| Resul|t;......|
|00002270| 69 2b 2b 3b 0d 0a 09 09 | 09 7d 0d 0a 09 09 09 50 |i++;....|.}.....P|
|00002280| 20 3d 20 50 2e 6e 65 78 | 74 50 61 77 6e 3b 0d 0a | = P.nex|tPawn;..|
|00002290| 09 09 7d 0d 0a 09 7d 0d | 0a 0d 0a 09 72 65 74 75 |..}...}.|....retu|
|000022a0| 72 6e 20 52 65 73 75 6c | 74 3b 0d 0a 7d 0d 0a 0d |rn Resul|t;..}...|
|000022b0| 0a 2f 2f 20 47 65 74 20 | 61 6e 20 61 72 62 69 74 |.// Get |an arbit|
|000022c0| 72 61 72 79 20 70 72 6f | 70 65 72 74 79 20 66 72 |rary pro|perty fr|
|000022d0| 6f 6d 20 74 68 65 20 6c | 65 76 65 6c 20 6f 62 6a |om the l|evel obj|
|000022e0| 65 63 74 2e 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 73 |ect...fu|nction s|
|000022f0| 74 72 69 6e 67 5b 32 34 | 30 5d 20 47 65 74 4c 65 |tring[24|0] GetLe|
|00002300| 76 65 6c 50 72 6f 70 65 | 72 74 79 28 73 74 72 69 |velPrope|rty(stri|
|00002310| 6e 67 5b 32 34 30 5d 20 | 50 72 6f 70 29 0d 0a 7b |ng[240] |Prop)..{|
|00002320| 0d 0a 09 6c 6f 63 61 6c | 20 73 74 72 69 6e 67 5b |...local| string[|
|00002330| 32 34 30 5d 20 52 65 73 | 75 6c 74 53 65 74 3b 0d |240] Res|ultSet;.|
|00002340| 0a 09 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |.....Res|ultSet =|
|00002350| 20 22 5c 5c 22 24 50 72 | 6f 70 24 22 5c 5c 22 24 | "\\"$Pr|op$"\\"$|
|00002360| 4c 65 76 65 6c 2e 47 65 | 74 50 72 6f 70 65 72 74 |Level.Ge|tPropert|
|00002370| 79 54 65 78 74 28 50 72 | 6f 70 29 3b 0d 0a 09 0d |yText(Pr|op);....|
|00002380| 0a 09 72 65 74 75 72 6e | 20 52 65 73 75 6c 74 53 |..return| ResultS|
|00002390| 65 74 3b 0d 0a 7d 0d 0a | 0d 0a 2f 2f 20 47 65 74 |et;..}..|..// Get|
|000023a0| 20 61 6e 20 61 72 62 69 | 74 72 61 72 79 20 70 72 | an arbi|trary pr|
|000023b0| 6f 70 65 72 74 79 20 66 | 72 6f 6d 20 74 68 65 20 |operty f|rom the |
|000023c0| 67 61 6d 65 20 6f 62 6a | 65 63 74 2e 0d 0a 66 75 |game obj|ect...fu|
|000023d0| 6e 63 74 69 6f 6e 20 73 | 74 72 69 6e 67 5b 32 34 |nction s|tring[24|
|000023e0| 30 5d 20 47 65 74 47 61 | 6d 65 50 72 6f 70 65 72 |0] GetGa|meProper|
|000023f0| 74 79 28 73 74 72 69 6e | 67 5b 32 34 30 5d 20 50 |ty(strin|g[240] P|
|00002400| 72 6f 70 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |rop)..{.|..local |
|00002410| 73 74 72 69 6e 67 5b 32 | 34 30 5d 20 52 65 73 75 |string[2|40] Resu|
|00002420| 6c 74 53 65 74 3b 0d 0a | 0d 0a 09 52 65 73 75 6c |ltSet;..|...Resul|
|00002430| 74 53 65 74 20 3d 20 22 | 5c 5c 22 24 50 72 6f 70 |tSet = "|\\"$Prop|
|00002440| 24 22 5c 5c 22 24 4c 65 | 76 65 6c 2e 47 61 6d 65 |$"\\"$Le|vel.Game|
|00002450| 2e 47 65 74 50 72 6f 70 | 65 72 74 79 54 65 78 74 |.GetProp|ertyText|
|00002460| 28 50 72 6f 70 29 3b 0d | 0a 09 0d 0a 09 72 65 74 |(Prop);.|.....ret|
|00002470| 75 72 6e 20 52 65 73 75 | 6c 74 53 65 74 3b 0d 0a |urn Resu|ltSet;..|
|00002480| 7d 0d 0a 0d 0a 2f 2f 20 | 47 65 74 20 61 6e 20 61 |}....// |Get an a|
|00002490| 72 62 69 74 72 61 72 79 | 20 70 72 6f 70 65 72 74 |rbitrary| propert|
|000024a0| 79 20 66 72 6f 6d 20 74 | 68 65 20 70 6c 61 79 65 |y from t|he playe|
|000024b0| 72 73 2e 0d 0a 66 75 6e | 63 74 69 6f 6e 20 73 74 |rs...fun|ction st|
|000024c0| 72 69 6e 67 5b 32 34 30 | 5d 20 47 65 74 50 6c 61 |ring[240|] GetPla|
|000024d0| 79 65 72 50 72 6f 70 65 | 72 74 79 28 73 74 72 69 |yerPrope|rty(stri|
|000024e0| 6e 67 5b 32 34 30 5d 20 | 50 72 6f 70 29 0d 0a 7b |ng[240] |Prop)..{|
|000024f0| 0d 0a 09 6c 6f 63 61 6c | 20 73 74 72 69 6e 67 5b |...local| string[|
|00002500| 32 34 30 5d 20 52 65 73 | 75 6c 74 53 65 74 3b 0d |240] Res|ultSet;.|
|00002510| 0a 09 6c 6f 63 61 6c 20 | 69 6e 74 20 69 3b 0d 0a |..local |int i;..|
|00002520| 09 6c 6f 63 61 6c 20 50 | 6c 61 79 65 72 50 61 77 |.local P|layerPaw|
|00002530| 6e 20 50 3b 0d 0a 0d 0a | 09 66 6f 72 65 61 63 68 |n P;....|.foreach|
|00002540| 20 41 6c 6c 41 63 74 6f | 72 73 28 63 6c 61 73 73 | AllActo|rs(class|
|00002550| 27 50 6c 61 79 65 72 50 | 61 77 6e 27 2c 20 50 29 |'PlayerP|awn', P)|
|00002560| 20 7b 0d 0a 09 09 69 2b | 2b 3b 0d 0a 09 09 52 65 | {....i+|+;....Re|
|00002570| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|00002580| 53 65 74 24 22 5c 5c 22 | 24 50 72 6f 70 24 22 5f |Set$"\\"|$Prop$"_|
|00002590| 22 24 69 24 22 5c 5c 22 | 24 50 2e 47 65 74 50 72 |"$i$"\\"|$P.GetPr|
|000025a0| 6f 70 65 72 74 79 54 65 | 78 74 28 50 72 6f 70 29 |opertyTe|xt(Prop)|
|000025b0| 3b 0d 0a 09 7d 0d 0a 09 | 0d 0a 09 72 65 74 75 72 |;...}...|...retur|
|000025c0| 6e 20 52 65 73 75 6c 74 | 53 65 74 3b 0d 0a 7d 0d |n Result|Set;..}.|
|000025d0| 0a 0d 0a 00 | |.... | |
+--------+-------------------------+-------------------------+--------+--------+